package com.bbzn.user.client.service;

import com.bbzn.user.client.dataobject.User;
import com.bbzn.user.client.dto.user.UserInfoDTO;

import java.util.List;

public interface UserService {


    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertOrUpdate(User record);

    int insertOrUpdateSelective(User record);

    int insertSelective(User record);

    int insertBaseSelective(User record);

    int selectCountBySelective(User record);

    User selectByPrimaryKey(Long id);

    int selectSubOneCount(Long pid);

    List<UserInfoDTO> selectByPid(Long pid);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    List<User> findByAll(User user);

    int updateBatch(List<User> list);

    int batchInsert(List<User> list);

    /**
     * 根据userID批量查询
     *
     * @param ids
     * @return
     */
    List<User> selectBatchIds(List<Long> ids);

    /**
     * 根据父id查询所有的子id
     * @param pid
     * @return
     */
    List<Long> selectSubIdByPid(Long pid);

    /**
     * 根据子id查询所有的父id
     * @param id
     * @return
     */
    List<Long> selectPidById(Long id);

    int updateBatchSelective(List<User> list);

    User selectByPhone(String phone);
}









